package com.hqj.demo01;

/**
 * 方法的重载
 * @author HQJ
 */
public class MethodOverload {

    public static void main(String[] args) {
        MethodOverload mo = new MethodOverload();
        float a = 10;
        float b = 12;
        mo.add(a,b);
    }

    public void add(double a,double b){
        System.out.println("double a + double b = "+ (a+b));
    }

    public void add(long a,long b){
        System.out.println("long a + long b = "+ (a+b));
    }

    public void add(long a,double b){
        System.out.println("long a + double b = "+ (a+b));
    }

    public void add(double a,long b){
        System.out.println("double a + long b = "+ (a+b));
    }

}
